package com.ljh.onlinetest.service;

import com.github.pagehelper.PageInfo;
import com.ljh.onlinetest.domain.ExamPaperQuestionCustomerAnswer;
import com.ljh.onlinetest.domain.other.ExamPaperAnswerUpdate;
import com.ljh.onlinetest.viewmodel.student.exam.ExamPaperSubmitItemVM;
import com.ljh.onlinetest.viewmodel.student.question.answer.QuestionPageStudentRequestVM;

import java.util.List;

/**
 * @author 余一
 * @date 2022/2/22  23:31
 */
public interface ExamPaperQuestionCustomerAnswerService extends BaseService<ExamPaperQuestionCustomerAnswer> {
    Integer selectAllCount();

    List<Integer> selectMothCount();

    List<ExamPaperQuestionCustomerAnswer> selectListByPaperAnswerId(Integer id);

    /**
     *试卷问题答题信息 转成viewModel 传给前台
     * @param a
     * @return
     */
    ExamPaperSubmitItemVM examPaperQuestionCustomerAnswerToVM(ExamPaperQuestionCustomerAnswer a);

    int updateScore(List<ExamPaperAnswerUpdate> examPaperAnswerUpdates);

    /**
     * 试卷提交答案入库
     * @param examPaperQuestionCustomerAnswers
     */
    void insertList(List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers);

    PageInfo<ExamPaperQuestionCustomerAnswer> studentPage(QuestionPageStudentRequestVM model);
}
